<?php /* Smarty version 2.6.26, created on 2011-12-14 13:58:48
         compiled from en_gb_maintain.tpl */ ?>
<?php if (! $this->_tpl_vars['EMBEDDED_REPORT']): ?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<HEAD>
<TITLE><?php echo $this->_tpl_vars['TITLE']; ?>
</TITLE>
</HEAD>
<BODY class="swMntBody">
<?php endif; ?>
<LINK id="PRP_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="<?php echo $this->_tpl_vars['STYLESHEET']; ?>
">
<FORM class="swMntForm" name="topmenu" method="POST" action="<?php echo $this->_tpl_vars['SCRIPT_SELF']; ?>
">
<H1 class="swTitle"><?php echo $this->_tpl_vars['TITLE']; ?>
</H1>
<?php if (strlen ( $this->_tpl_vars['STATUSMSG'] ) > 0): ?> 
			<TABLE class="swStatus">
				<TR>
					<TD><?php echo $this->_tpl_vars['STATUSMSG']; ?>
</TD>
				</TR>
			</TABLE>
<?php endif; ?>
<?php if (strlen ( $this->_tpl_vars['ERRORMSG'] ) > 0): ?> 
			<TABLE class="swError">
				<TR>
					<TD><?php echo $this->_tpl_vars['ERRORMSG']; ?>
</TD>
				</TR>
			</TABLE>
<?php endif; ?>
<input type="hidden" name="session_name" value="<?php echo $this->_tpl_vars['SESSION_ID']; ?>
" />
<?php if ($this->_tpl_vars['SHOW_TOPMENU']): ?>
	<TABLE class="swMntTopMenu">
		<TR>
<?php if (( $this->_tpl_vars['DB_LOGGEDON'] )): ?> 
			<TD class="swPrpTopMenuCell">
<?php if (( $this->_tpl_vars['DBUSER'] )): ?>
Logged On As <?php echo $this->_tpl_vars['DBUSER']; ?>

<?php else: ?>
&nbsp;
<?php endif; ?>
			</TD>
<?php endif; ?>
<?php if (strlen ( $this->_tpl_vars['MAIN_MENU_URL'] ) > 0): ?> 
			<TD style="text-align: left;">
				<a class="swLinkMenu" href="<?php echo $this->_tpl_vars['MAIN_MENU_URL']; ?>
">Project Menu</a>
				&nbsp;<a class="swLinkMenu" href="<?php echo $this->_tpl_vars['ADMIN_MENU_URL']; ?>
">Admin Menu</a>
				&nbsp;<input class="swLinkMenu" type="submit" name="submit_prepare_mode" value="Run Report">
			</TD>
<?php endif; ?>
<?php if ($this->_tpl_vars['SHOW_MODE_MAINTAIN_BOX'] && 0): ?>
			<TD style="text-align: left;">
				<input class="swMntButton" type="submit" name="submit_genws_mode" value="Generate Web Service">
			</TD>
			<TD style="text-align: right;">
			</TD>
<?php endif; ?>
<?php if ($this->_tpl_vars['SHOW_LOGOUT']): ?>
			<TD style="width: 15%; text-align: right; padding-right: 10px;" align="right" class="swPrpTopMenuCell">
				<input class="swLinkMenu" type="submit" name="logout" value="Log Off">
			</TD>
<?php endif; ?>
<?php if ($this->_tpl_vars['SHOW_LOGIN']): ?>
			<TD style="width: 50%"></TD>
			<TD style="width: 35%" align="right" class="swPrpTopMenuCell">
<?php if (strlen ( $this->_tpl_vars['PASSWORD_ERROR'] ) > 0): ?>
                                <div style="color: #ff0000;"><?php echo $this->_tpl_vars['PASSWORD_ERROR']; ?>
</div>
<?php endif; ?>
				Password for Design Mode <input type="password" name="project_password" value="">
			</TD>
			<TD style="width: 15%" align="right" class="swPrpTopMenuCell">
				<input class="swPrpSubmit" type="submit" name="login" value="Login">
			</TD>
<?php endif; ?>
		</TR>
	</TABLE>
<?php endif; ?>
	<TABLE class="swMntMainBox" cellspacing="0" cellpadding="0">
		<TR>
			<TD>
<?php echo $this->_tpl_vars['CONTENT']; ?>

			</TD>
		</TR>
	</TABLE>
</FORM>
<div class="smallbanner">Powered by <a href="http://www.reportico.org/" target="_blank">reportico <?php echo $this->_tpl_vars['REPORTICO_VERSION']; ?>
</a></div>
<?php if (! $this->_tpl_vars['EMBEDDED_REPORT']): ?>
</BODY>
</HTML>
<?php endif; ?>

<?php if (! $this->_tpl_vars['AJAX_ENABLED']): ?> 
<?php echo '
<script>
jQuery(function($) { 
$(document).ready(function(){
	//$(\'#criteriaform\').live(\'submit\', function(event){ 
		//return false;
	//});
	$(function() {
		$(".swDateField").each(function(){
                                        $(this).datepicker({dateFormat: "yy-mm-dd"});
                                });

	});
	$(\'#prepareAjaxExpand\').live(\'click\', function() {
       		$("#swPrpExpandCell").addClass("loading");
       		$.ajax({
           			type: \'GET\',
            		url: $("#criteriaform").attr(\'action\'),
            		data: $("#criteriaform").serialize() + \'&partial_template=critbody&execute_mode=PREPARE&\' + $(this).attr(\'name\') + \'=\' + $(this).attr(\'value\'),
           			dataType: \'html\',
           			success: function(data, status) {
       					$("#swPrpExpandCell").removeClass("loading");
                   			$("#criteriabody").attr(\'innerHTML\',data);
           			},
           			error: function(xhr, desc, err) {
       					$("#swPrpExpandCell").removeClass("loading");
       					$("#criteriabody").attr(\'innerHTML\',\'Error in lookup option\');
          			}
       		});
		return false;
	});
	$(\'#prepareAjaxButton\').live(\'click\', function() {
       		$("#swPrpExpandCell").addClass("loading");
       		$.ajax({
           			type: \'GET\',
            		url: $("#criteriaform").attr(\'action\'),
            		data: $("#criteriaform").serialize() + \'&partial_template=expand&execute_mode=PREPARE&\' + $(this).attr(\'name\') + \'=\' + $(this).attr(\'value\'),
           			dataType: \'html\',
           			success: function(data, status) {
       					$("#swPrpExpandCell").removeClass("loading");
                   			$("#swPrpExpandCell").attr(\'innerHTML\',data);
           			},
           			error: function(xhr, desc, err) {
       					$("#swPrpExpandCell").removeClass("loading");
       					$("#swPrpExpandCell").attr(\'innerHTML\',\'Error in lookup option\');
          			}
       		});
		return false;
	});
	$(\'#ignoreprepareAjaxExecute\').click(function() {
		//$("#swPrpExpandCell").attr(\'innerHTML\',"Loading");
       		$("#swPrpExpandCell").addClass("loading");
       		$.ajax({
           			type: \'GET\',
            		url: $("#criteriaform").attr(\'action\'),
            		data: $("#criteriaform").serialize() + \'&\' + $(this).attr(\'name\') + \'=\' + $(this).attr(\'value\'),
           			dataType: \'html\',
           			success: function(data, status) {
       					$("#swPrpExpandCell").removeClass("loading");
                   			$("#swPrpExpandCell").attr(\'innerHTML\',data);
           			},
           			error: function(xhr, desc, err) {
       					$("#swPrpExpandCell").removeClass("loading");
       					$("#swPrpExpandCell").attr(\'innerHTML\',\'Error in lookup option\');
          			}
       		});
		return false;
	});
});
});
</script>
'; ?>

<?php endif; ?>